package com.jfs.properties;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Description 自定义线程池配置文件
 * @E-mail cwm3412638@163.com
 * @Author cwm
 * @Date 2022-08-23
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "jfs.executor.common")
public class TaskExecutorProperties {
    private final static String THREAD_NAME_PREFIX="commonExecutor-";
    /**
     * 线程池维护线程的最小数量.
     */
    private int corePoolSize = 10;
    /**
     * 线程池维护线程的最大数量
     */
    private int maxPoolSize = 200;
    /**
     * 队列最大长度
     */
    private int queueCapacity = 10;
    /**
     * 线程池前缀
     */
    private String threadNamePrefix = THREAD_NAME_PREFIX;
}
